<!DOCTYPE html>
<html lang="en" xmlns:th="http://www/thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>上传文件</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .main{
            left: 0;
            top: 0;
            width: 440px;
            height: 400px;
            margin: auto;
        }
    </style>
</head>
<body>
<div class="main">
    <div class="panel panel-primary">
        <!-- .panel-heading 面板头信息。 -->
        <div class="panel-heading">
            <!-- .panel-title 面板标题。 -->
            <h1 class="panel-title">上传excl并插入到数据库</h1>
        </div>
    </div>
    <form class="form-horizontal" action="uploadExcl" enctype="multipart/form-data" method="post">
        <input type="file" id="upload" value="请选择文件" onchange="uploadFile()" name="uploadFiles" multiple>
        <input type="submit" value="点击上传">
    </form>
</div>
</body>
<script type="text/javascript">
    function uploadFile(){
        var upload = document.getElementById("upload")
        console.log(upload.files[0])
    }
</script>
</html>